<?PHP
	include_once "UserControl.php";
	
	$label_name = mysql_real_escape_string($_POST["name"]);
	$label_cpf = mysql_real_escape_string($_POST["cpf"]);
	$label_sex = $_POST["select"];
	$label_password = mysql_real_escape_string($_POST["password"]);
	$label_confirmPassword = mysql_real_escape_string($_POST["confirm"]);
	
	$result = UserControl::cadastreAdmin($label_name, $label_cpf, $label_sex, $label_password, $label_confirmPassword);
	
	if($result)
	{
		header ("Location: index.php?user_form_success=true");
	}
	else
	{
		header ("Location: cadastroAdministrador.php?user_form_success=false");
	}
?>